package com.wmapp.domain;

import com.wmapp.utils.SimpleStringUtils;

/**
 * Conference profile
 * 
 * @author dengl
 * 
 */
public class ConfProfile {
	private String profileName;// required
	private String modifyTime;// 2011-02-20 17:08
	private String confName;
	private String bandwidth;// int required
	private String maxAudioPorts;// int
	private String maxVideoPorts;// int
	private String reservedAudioPorts;// boolean
	private String reservedVideoPorts; // boolean
	private String encryptEnabled; // boolean
	private String encryptForced; // boolean
	private String callInType;// {"list","none","all","registered" }
	private String muteOnJoin;// boolean 自动静音
	private String audioFormats;// 按优先顺序排列"g7221c,g7221,g722,g728,g729,mulaw,alaw";
	private String h263cif4Enabled;// boolean 是否启动H.263 4CIF
	private String h264Enabled;// boolean 是否启动H.264
	private String h264Definition;// {"CIF", "CIF4", "HD720P", "HD1080P"}
	private String h239Bandwidth;// Integer 双流带宽(kbps)
	private String h239Enabled; // boolean 是否启动双流
	private String h239Codec;// {“H.264”, “H.263”}
	private String textPosition;// {"top_left","top_center","top_right","bottom_left","bottom_center","bottom_right"}
	private String textFont;// {"big", "middle", "small"}
	private String textColor;// 文字颜色RGB值，例如：#ffffff
	private String textBgEnabled;// boolean 是否启动文字背景
	private String textBgColor;// 背景颜色RGB值
    private String textDisplayTime;// 显示时间
	private String broadcastEnabled;// boolean 启动会议直播
	private String broadcastBandwidth;// Integer 直播带宽
	private String broadcastNumLimit;// Integer 直播接入数
	private String broadcastPassword;// 直播接入密码
	private String description;
	
	private String encrypt;//disable,enable,forced
	private String[] audioFormatsArray;

	public static final String[] ADD_PARAM_FIELDS = { "profileName",
			"modifyTime", "confName", "bandwidth", "maxAudioPorts",
			"maxVideoPorts", "reservedAudioPorts", "reservedVideoPorts",
			"encryptEnabled", "encryptForced", "callInType", "muteOnJoin",
			"audioFormats", "h263cif4Enabled", "h264Enabled", "h264Definition",
			"h239Bandwidth", "h239Enabled", "h239Codec", "textPosition",
			"textFont", "textColor", "textBgEnabled", "textBgColor","textDisplayTime",
			"broadcastEnabled", "broadcastBandwidth", "broadcastNumLimit",
			"broadcastPassword","description" };
	public final static String[] MODIFY_PARAM_FIELDS = { "profileName",
			"modifyTime", "confName", "bandwidth", "maxAudioPorts",
			"maxVideoPorts", "reservedAudioPorts", "reservedVideoPorts",
			"encryptEnabled", "encryptForced", "callInType", "muteOnJoin",
			"audioFormats", "h263cif4Enabled", "h264Enabled", "h264Definition",
			"h239Bandwidth", "h239Enabled", "h239Codec", "textPosition",
			"textFont", "textColor", "textBgEnabled", "textBgColor","textDisplayTime",
			"broadcastEnabled", "broadcastBandwidth", "broadcastNumLimit",
			"broadcastPassword","description" };
	public final static String[] GRID_COLS = { "profileName", "bandwidth","h264Definition","modifyTime","description"};

	public String getProfileName() {
		return profileName;
	}

	public void setProfileName(String profileName) {
		this.profileName = profileName;
	}

	public String getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(String modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getConfName() {
		return confName;
	}

	public void setConfName(String confName) {
		this.confName = confName;
	}

	public String getBandwidth() {
		return bandwidth;
	}

	public void setBandwidth(String bandwidth) {
		this.bandwidth = bandwidth;
	}

	public String getMaxAudioPorts() {
		return maxAudioPorts;
	}

	public String getEncrypt() {
		return encrypt;
	}

	public void setEncrypt(String encrypt) {
		if(encrypt!=null&&encrypt.equals("disable")){
			this.encryptEnabled="false";
		}
		if(encrypt!=null&&encrypt.equals("enable")){
			this.encryptEnabled="true";
		}
		if(encrypt!=null&&encrypt.equals("forced")){
			this.encryptForced="true";
		}
		this.encrypt = encrypt;
	}

	public void setMaxAudioPorts(String maxAudioPorts) {
		this.maxAudioPorts = maxAudioPorts;
	}

	public String getMaxVideoPorts() {
		return maxVideoPorts;
	}

	public void setMaxVideoPorts(String maxVideoPorts) {
		this.maxVideoPorts = maxVideoPorts;
	}

	public String getReservedAudioPorts() {
		return reservedAudioPorts;
	}

	public void setReservedAudioPorts(String reservedAudioPorts) {
		this.reservedAudioPorts = reservedAudioPorts;
	}

	public String getReservedVideoPorts() {
		return reservedVideoPorts;
	}

	public void setReservedVideoPorts(String reservedVideoPorts) {
		this.reservedVideoPorts = reservedVideoPorts;
	}

	public String getEncryptEnabled() {
		return encryptEnabled;
	}

	public void setEncryptEnabled(String encryptEnabled) {
		if(encryptEnabled!=null&&encryptEnabled.equals("true")){
			this.encrypt="enable";
		}
		if(encryptEnabled!=null&&encryptEnabled.equals("false")){
			this.encrypt="disable";
		}
		this.encryptEnabled = encryptEnabled;
	}

	public String getEncryptForced() {
		return encryptForced;
	}

	public void setAudioFormatsArray(String[] audioFormatsArray) {
		if(audioFormatsArray!=null){
			this.audioFormats=SimpleStringUtils.array2String(audioFormatsArray);
		}
		
		this.audioFormatsArray = audioFormatsArray;
	}

	public void setEncryptForced(String encryptForced) {
		if(encryptForced!=null&&encryptForced.equals("true")){
			this.encrypt="forced";
		}
		this.encryptForced = encryptForced;
	}

	public String getCallInType() {
		return callInType;
	}

	public void setCallInType(String callInType) {
		this.callInType = callInType;
	}

	public String getMuteOnJoin() {
		return muteOnJoin;
	}

	public void setMuteOnJoin(String muteOnJoin) {
		this.muteOnJoin = muteOnJoin;
	}

	public String getAudioFormats() {
		return audioFormats;
	}

	public void setAudioFormats(String audioFormats) {
		this.audioFormats = audioFormats;
	}

	public String getH263cif4Enabled() {
		return h263cif4Enabled;
	}

	public void setH263cif4Enabled(String h263cif4Enabled) {
		this.h263cif4Enabled = h263cif4Enabled;
	}

	public String getH264Enabled() {
		return h264Enabled;
	}

	public void setH264Enabled(String h264Enabled) {
		this.h264Enabled = h264Enabled;
	}

	public String getH264Definition() {
		return h264Definition;
	}

	public void setH264Definition(String h264Definition) {
		this.h264Definition = h264Definition;
	}

	public String getH239Bandwidth() {
		return h239Bandwidth;
	}

	public void setH239Bandwidth(String h239Bandwidth) {
		this.h239Bandwidth = h239Bandwidth;
	}

	public String getH239Enabled() {
		return h239Enabled;
	}

	public void setH239Enabled(String h239Enabled) {
		this.h239Enabled = h239Enabled;
	}

	public String getH239Codec() {
		return h239Codec;
	}

	public void setH239Codec(String h239Codec) {
		this.h239Codec = h239Codec;
	}

	public String getTextPosition() {
		return textPosition;
	}

	public void setTextPosition(String textPosition) {
		this.textPosition = textPosition;
	}

	public String getTextFont() {
		return textFont;
	}

	public void setTextFont(String textFont) {
		this.textFont = textFont;
	}

	public String getTextColor() {
		return textColor;
	}

	public void setTextColor(String textColor) {
		this.textColor = textColor;
	}

	public String getTextBgEnabled() {
		return textBgEnabled;
	}

	public void setTextBgEnabled(String textBgEnabled) {
		this.textBgEnabled = textBgEnabled;
	}

	public String getTextBgColor() {
		return textBgColor;
	}

	public void setTextBgColor(String textBgColor) {
		this.textBgColor = textBgColor;
	}

    public String getTextDisplayTime() {
		return textDisplayTime;
	}

	public void setTextDisplayTime(String textDisplayTime) {
		this.textDisplayTime = textDisplayTime;
	}

	public String getBroadcastEnabled() {
		return broadcastEnabled;
	}

	public void setBroadcastEnabled(String broadcastEnabled) {
		this.broadcastEnabled = broadcastEnabled;
	}

	public String getBroadcastBandwidth() {
		return broadcastBandwidth;
	}

	public void setBroadcastBandwidth(String broadcastBandwidth) {
		this.broadcastBandwidth = broadcastBandwidth;
	}

	public String getBroadcastNumLimit() {
		return broadcastNumLimit;
	}

	public void setBroadcastNumLimit(String broadcastNumLimit) {
		this.broadcastNumLimit = broadcastNumLimit;
	}

	public String getBroadcastPassword() {
		return broadcastPassword;
	}

	public void setBroadcastPassword(String broadcastPassword) {
		this.broadcastPassword = broadcastPassword;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
